/**
  **********************************************************************************************************************
  * @file    queue.h
  * @brief   该文件提供单向队列FIFO所有函数原型
  * @author  const_zpc    any question please send mail to const_zpc@163.com
  * @version V0.2
  * @date    2023-05-29
  **********************************************************************************************************************
  *
  **********************************************************************************************************************
  */

/* Define to prevent recursive inclusion -----------------------------------------------------------------------------*/

#ifndef __FU_QUEUE_H__
#define __FU_QUEUE_H__

/* Includes ----------------------------------------------------------------------------------------------------------*/
#include "stdint.h"
#include "stdbool.h"
#include "stddef.h"



typedef struct
{
    uint8_t front;
    uint8_t rear;
	uint8_t item_num;
	uint8_t item_len;
    uint8_t *length;
    uint8_t *ring_buff;
}st_queue;

uint8_t queue_is_full(st_queue  *queue);
uint8_t queue_is_empty(st_queue  *queue);
void queue_pop(st_queue  *queue,uint8_t * data,uint8_t *length);
void queue_push(st_queue  *queue,uint8_t * data,uint8_t length);
void queue_init(st_queue  *queue,uint8_t item_num,uint8_t item_len,uint8_t *len_buf,uint8_t *data_buf);


#endif




